Adversarial training of neural networks

ABSTRACT

Methods, systems, and apparatus, including computer programs encoded on computer storage media, for adversarial training of a neural network. One of the methods includes obtaining a plurality of training inputs; and training the neural network on each of the training inputs, comprising, for each of the training inputs: processing the training input using the neural network to determine a neural network output for the training input; applying a perturbation to the training input to generate an adversarial perturbation of the training input; processing the adversarial perturbation of the training input using the neural network to determine a neural network output for the adversarial perturbation; and adjusting the current values of the parameters of the neural network by performing an iteration of a neural network training procedure to optimize an adversarial objective function.

CROSS-REFERENCE TO RELATED APPLICATION

This application claims priority to U.S. Provisional Application No.62/233,968, filed on Sep. 28, 2015. The disclosure of the priorapplication is considered part of and is incorporated by reference inthe disclosure of this application.

BACKGROUND

This specification relates to training neural networks.

Neural networks are machine learning models that employ one or morelayers of models to predict an output for a received input. Some neuralnetworks include one or more hidden layers in addition to an outputlayer. The output of each hidden layer is used as input to the nextlayer in the network, i.e., the next hidden layer or the output layer.Each layer of the network generates an output from a received input inaccordance with current values of a respective set of parameters.

SUMMARY

In general, one innovative aspect of the subject matter described inthis specification can be embodied in methods that include the actionsof obtaining training inputs for training a neural network and, for eachof the training inputs, a respective target output for the traininginput and training the neural network on each of the training inputs.Training the neural network on a given training input includes:processing the training input using the neural network to determine aneural network output for the training input in accordance with currentvalues of the parameters of the neural network; applying a perturbationto the training input to generate an adversarial perturbation of thetraining input; processing the adversarial perturbation of the traininginput using the neural network to determine a neural network output forthe adversarial perturbation of the training input in accordance withthe current values of the parameters of the neural network; andadjusting the current values of the parameters of the neural network byperforming an iteration of a neural network training procedure tooptimize an adversarial objective function, wherein the adversarialobjective function is a combination of: (i) a specified objectivefunction taking as input the neural network output for the traininginput and the target output for the training input; and (ii) thespecified objective function taking as input the neural network outputfor the adversarial perturbation of the training input and the targetoutput for the training input.

Other implementations of this and other aspects include correspondingsystems, apparatus, and computer programs, configured to perform theactions of the methods, encoded on computer storage devices. A system ofone or more computers can be so configured by virtue of software,firmware, hardware, or a combination of them installed on the systemthat in operation cause the system to perform the actions. One or morecomputer programs can be so configured by virtue of having instructionsthat, when executed by data processing apparatus, cause the apparatus toperform the actions.

Particular embodiments of the subject matter described in thisspecification can be implemented so as to realize one or more of thefollowing advantages. By training a neural network on both originaltraining inputs and adversarial perturbations of the original traininginputs, the performance of the neural network when trained can beimproved. Additionally, by training the neural network as described inthis specification, the trained neural network becomes more resistant toadversarial examples formed by applying small perturbations to examplesfrom a test dataset. That is, the accuracy of predictions generated bythe neural network for the adversarial examples and on the data setoverall is improved. Additionally, by training the neural network asdescribed in this specification, the trained neural network can bettergeneralize to new inputs having characteristics different from those ofinputs in the training data for the neural network. Additionally, bytraining the neural network as described in this specification, a largerneural network can be trained to achieve improved performance withoutoverfitting to the training inputs in the training data.

The details of one or more embodiments of the subject matter of thisspecification are set forth in the accompanying drawings and thedescription below. Other features, aspects, and advantages of thesubject matter will become apparent from the description, the drawings,and the claims.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows an example neural network training system.

FIG. 2 is a flow diagram of an example process for training a neuralnetwork using adversarial perturbations.

FIG. 3 is a flow diagram of an example process for training a neuralnetwork on a training item and an adversarial perturbation of thetraining item.

Like reference numbers and designations in the various drawings indicatelike elements.

DETAILED DESCRIPTION

FIG. 1 shows an example neural network training system 100. The neuralnetwork training system 100 is an example of a system implemented ascomputer programs on one or more computers in one or more locations, inwhich the systems, components, and techniques described below can beimplemented.

The neural network training system 100 trains a neural network 110 ontraining inputs from a training data repository 120 to determine trainedvalues of the parameters of the neural network 110 from initial valuesof the parameters. The neural network 110 can be a feedforward deepneural network, e.g., a convolutional neural network, or a recurrentneural network, e.g., a long short term (LSTM) neural network.

The neural network 110 can be configured to receive any kind of digitaldata input and to generate any kind of score or classification outputbased on the input.

For example, if the inputs to the neural network 110 are images orfeatures that have been extracted from images, the output generated bythe neural network 110 for a given image may be scores for each of a setof object categories, with each score representing an estimatedlikelihood that the image contains an image of an object belonging tothe category.

As another example, if the inputs to the neural network 110 are Internetresources (e.g., web pages), documents, or portions of documents orfeatures extracted from Internet resources, documents, or portions ofdocuments, the output generated by the neural network 110 for a givenInternet resource, document, or portion of a document may be a score foreach of a set of topics, with each score representing an estimatedlikelihood that the Internet resource, document, or document portion isabout the topic.

As another example, if the inputs to the neural network 110 are featuresof an impression context for a particular advertisement, the outputgenerated by the neural network 110 may be a score that represents anestimated likelihood that the particular advertisement will be clickedon.

As another example, if the inputs to the neural network 110 are featuresof a personalized recommendation for a user, e.g., featurescharacterizing the context for the recommendation, e.g., featurescharacterizing previous actions taken by the user, the output generatedby the neural network 110 may be a score for each of a set of contentitems, with each score representing an estimated likelihood that theuser will respond favorably to being recommended the content item.

As another example, if the input to the neural network 110 is a sequenceof text in one language, the output generated by the neural network 110may be a score for each of a set of pieces of text in another language,with each score representing an estimated likelihood that the piece oftext in the other language is a proper translation of the input textinto the other language.

As another example, if the input to the neural network 110 is a sequencerepresenting a spoken utterance, the output generated by the neuralnetwork 110 may be a score for each of a set of pieces of text, eachscore representing an estimated likelihood that the piece of text is thecorrect transcript for the utterance.

The training data in the training data repository 120 includes multipletraining inputs. Generally, each training input is an input of the typethat the neural network 110 is configured to receive. The training datarepository 120 also includes, for each training input, a respectivetarget output, i.e., the output that should be generated by the neuralnetwork 110 by processing the training input.

Generally, the neural network training system 100 trains the neuralnetwork 110 on the training items in the training data repository 120and on adversarial perturbations of the training items.

In particular, the neural network training system 100 includes anadversarial perturbation engine 130 that receives a training input fromthe training data repository 120 and generates an adversarialperturbation of the training input, e.g., adversarial perturbation 132of a training input 122 from the training input 122.

Generally, an adversarial perturbation of a given training input is aninput that is slightly different from the given training input. Inparticular, in some cases, the difference between each entry of theadversarial perturbation and the corresponding entry of the traininginput is small enough that the difference would be discarded by a sensoror data storage apparatus associated with the machine learning task thatthe neural network 110 is configured to perform. For example, digitalimages often use only 8 bits per pixel so they discard all informationbelow 1/255 of the dynamic range of image color values. Thus, an imagehaving color values that each differ by less than 1/255 of the dynamicrange from a corresponding color value in a training image would be anadversarial perturbation of the training image.

Generating an adversarial perturbation of a training input is describedin more detail below with reference to FIGS. 2 and 3.

The neural network training system 100 processes the training inputusing the neural network 110 in accordance with current values of theparameters of the neural network 110 to generate a neural network outputfor the training input, e.g., a neural network output 124 for thetraining input 122, and processes the adversarial perturbation of thetraining input using the neural network 110 in accordance with thecurrent values of the parameters of the neural network 110 to generate aneural network output for the adversarial perturbation, e.g., a neuralnetwork output 134 for the adversarial perturbation 132.

A training subsystem 150 in the neural network training system 100trains the neural network 110 using the target output for the traininginput, the neural network output for the training input, and the neuralnetwork output for the adversarial perturbation of the training input toadjust the current values of the parameters of the neural network 110.Training the neural network using this data is described in more detailbelow with reference to FIGS. 2 and 3.

In some implementations, once the neural network 110 has been trained todetermine the trained values of the parameters, the neural networktraining system 100 stores the trained values of the parameters of theneural network 110 for use in instantiating a trained neural network orprovides the trained values of the parameters to another system for usein instantiating a trained neural network.

FIG. 2 is a flow diagram of an example process 200 for training a neuralnetwork using adversarial perturbations. For convenience, the process200 will be described as being performed by a system of one or morecomputers located in one or more locations. For example, a neuralnetwork training system, e.g., the neural network training system 100 ofFIG. 1, appropriately programmed, can perform the process 200.

The system obtains training data for the neural network, e.g., from thetraining data repository 120 of FIG. 1 (step 202). The training dataincludes multiple training inputs and, for each of the multiple traininginputs, a respective target neural network output.

The system trains the neural network on each of the multiple traininginputs and, for each of the training inputs, an adversarial perturbationof the training input to determine trained values of the parameters ofthe neural network (step 204).

The system trains the neural network by optimizing a specified objectivefunction, i.e., as specified by a system designer or other user of thesystem, using a neural network training procedure. The objectivefunction can be any appropriate machine learning objective function,e.g., a cross-entropy loss function or a mean-squared loss function,but, for a given neural network input, generally takes as input a neuralnetwork output generated by the neural network for the neural networkinput and a target output for the neural network input.

However, rather than directly optimize the specified objective function,to improve the effectiveness of the training procedure and to improvethe performance of the neural network once trained, the system insteaduses the neural network training procedure to optimize an adversarialobjective function. The value of the adversarial objective function fora given training input is a combination of (i) the value of thespecified objective function taking as input the neural network outputfor the training input and the target output for the training input and(ii) the value of the specified objective function taking as input theneural network output for the adversarial perturbation of the traininginput and the target output for the training input.

For example, the adversarial objective function J′(θ,x,y) may satisfy:J′(θ,x,y)=αJ(θ,x,y)+(1−α)J(θ,{circumflex over (x)},y),where θ are the current values of the parameters of the neural networkas of the processing of the training input x, y is the target output forthe training input x, α is a predetermined constant value between 0 and1 exclusive, {circumflex over (x)} is the adversarial perturbation ofthe training input x, J (θ,x,y) is the specified objective functiontaking as input the neural network output for the training input and thetarget output y for the training input x, and J(θ,{circumflex over(x)},y) is the specified objective function taking as input the neuralnetwork output for the adversarial perturbation {circumflex over (x)} ofthe training input x and the target output y for the training input x.

The neural network training procedure may be, for example, aconventional stochastic gradient descent with backpropagation trainingprocedure.

FIG. 3 is a flow diagram of an example process 300 for training a neuralnetwork on a training item and an adversarial perturbation of thetraining item. For convenience, the process 300 will be described asbeing performed by a system of one or more computers located in one ormore locations. For example, a neural network training system, e.g., theneural network training system 100 of FIG. 1, appropriately programmed,can perform the process 300.

The system processes the training input using the neural network inaccordance with current values of the parameters of the neural networkto generate a neural network output for the training input (step 302).

The system applies a perturbation to the training input to generate anadversarial perturbation of the training input (step 304). As describedabove, the adversarial perturbation is an input that is slightlydifferent from the training input.

In some cases, to generate the adversarial perturbation, the systemmodifies one or of the entries of the training input so that themodified entry and the original entry differ by less than a thresholdvalue, where two values differing by less than the threshold value aretreated as the same value by a predetermined sensor or data storageapparatus. For example, the system can add or subtract a value that isless than the threshold value to each of the one or more entries.

In some implementations, the system determines a gradient of thespecified objective function with respect to the training input, e.g.,using backpropagation, and modifies the training input using thegradient of the specified objective function to determine theadversarial perturbation of the training input.

For example, the adversarial perturbation {circumflex over (x)} of thetraining input x may satisfy:{circumflex over (x)}=x+ϵsign(∇_(x)(J)),where x is the training input, ∇_(x)(J)) is the gradient of thespecified objective function computed with respect to the training inputx, ϵ is a predetermined constant value, and sign is a function thatreceives a vector of inputs and generates a vector of outputs such that,for each value in the vector of outputs, the value is a predeterminedpositive number, e.g., one, if the corresponding value in the vector ofinputs is positive, the value is zero if the corresponding value in thevector of inputs is zero, and the value is a predetermined negativenumber, e.g., negative one, if the corresponding value in the vector ofinputs is negative. In this example, ϵ is a value that is small enoughto be discarded by a sensor or data storage apparatus, e.g., due to thelimited precision of the sensor or data storage apparatus.

The system processes the adversarial perturbation of the training inputusing the neural network in accordance with the current values of theparameters of the neural network to generate a neural network output forthe adversarial perturbation (step 306).

The system adjusts the current values of the parameters of the neuralnetwork using the neural network output for the training input and theneural network output for the adversarial perturbation (308).

In particular, the system performs an iteration of the neural networktraining procedure to determine an update for the current values of theparameters of the neural network by optimizing the adversarial objectivefunction. In some cases, the system processes a batch of multipletraining inputs while keeping the current values of the parameters fixedand, once a parameter value update has been determined for each trainingexample in the batch, applies each of the parameter value updates to thecurrent values to generate updated values of the parameters. In someother cases, the system updates the values of the parameters after eachtraining input has been processed.

The system performs the process 300 for multiple different traininginputs to determine trained values of the parameters of the neuralnetwork from initial values of the parameters.

Embodiments of the subject matter and the functional operationsdescribed in this specification can be implemented in digital electroniccircuitry, in tangibly-embodied computer software or firmware, incomputer hardware, including the structures disclosed in thisspecification and their structural equivalents, or in combinations ofone or more of them. Embodiments of the subject matter described in thisspecification can be implemented as one or more computer programs, i.e.,one or more modules of computer program instructions encoded on atangible non transitory program carrier for execution by, or to controlthe operation of, data processing apparatus. Alternatively or inaddition, the program instructions can be encoded on an artificiallygenerated propagated signal, e.g., a machine-generated electrical,optical, or electromagnetic signal, that is generated to encodeinformation for transmission to suitable receiver apparatus forexecution by a data processing apparatus. The computer storage mediumcan be a machine-readable storage device, a machine-readable storagesubstrate, a random or serial access memory device, or a combination ofone or more of them. The computer storage medium is not, however, apropagated signal.

The term “data processing apparatus” encompasses all kinds of apparatus,devices, and machines for processing data, including by way of example aprogrammable processor, a computer, or multiple processors or computers.The apparatus can include special purpose logic circuitry, e.g., an FPGA(field programmable gate array) or an ASIC (application specificintegrated circuit). The apparatus can also include, in addition tohardware, code that creates an execution environment for the computerprogram in question, e.g., code that constitutes processor firmware, aprotocol stack, a database management system, an operating system, or acombination of one or more of them.

A computer program (which may also be referred to or described as aprogram, software, a software application, a module, a software module,a script, or code) can be written in any form of programming language,including compiled or interpreted languages, or declarative orprocedural languages, and it can be deployed in any form, including as astand alone program or as a module, component, subroutine, or other unitsuitable for use in a computing environment. A computer program may, butneed not, correspond to a file in a file system. A program can be storedin a portion of a file that holds other programs or data, e.g., one ormore scripts stored in a markup language document, in a single filededicated to the program in question, or in multiple coordinated files,e.g., files that store one or more modules, sub programs, or portions ofcode. A computer program can be deployed to be executed on one computeror on multiple computers that are located at one site or distributedacross multiple sites and interconnected by a communication network.

As used in this specification, an “engine,” or “software engine,” refersto a software implemented input/output system that provides an outputthat is different from the input. An engine can be an encoded block offunctionality, such as a library, a platform, a software development kit(“SDK”), or an object. Each engine can be implemented on any appropriatetype of computing device, e.g., servers, mobile phones, tabletcomputers, notebook computers, music players, e-book readers, laptop ordesktop computers, PDAs, smart phones, or other stationary or portabledevices, that includes one or more processors and computer readablemedia. Additionally, two or more of the engines may be implemented onthe same computing device, or on different computing devices.

The processes and logic flows described in this specification can beperformed by one or more programmable computers executing one or morecomputer programs to perform functions by operating on input data andgenerating output. The processes and logic flows can also be performedby, and apparatus can also be implemented as, special purpose logiccircuitry, e.g., an FPGA (field programmable gate array) or an ASIC(application specific integrated circuit).

Computers suitable for the execution of a computer program include, byway of example, can be based on general or special purposemicroprocessors or both, or any other kind of central processing unit.Generally, a central processing unit will receive instructions and datafrom a read only memory or a random access memory or both. The essentialelements of a computer are a central processing unit for performing orexecuting instructions and one or more memory devices for storinginstructions and data. Generally, a computer will also include, or beoperatively coupled to receive data from or transfer data to, or both,one or more mass storage devices for storing data, e.g., magnetic,magneto optical disks, or optical disks. However, a computer need nothave such devices. Moreover, a computer can be embedded in anotherdevice, e.g., a mobile telephone, a personal digital assistant (PDA), amobile audio or video player, a game console, a Global PositioningSystem (GPS) receiver, or a portable storage device, e.g., a universalserial bus (USB) flash drive, to name just a few.

Computer readable media suitable for storing computer programinstructions and data include all forms of non-volatile memory, mediaand memory devices, including by way of example semiconductor memorydevices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks,e.g., internal hard disks or removable disks; magneto optical disks; andCD ROM and DVD-ROM disks. The processor and the memory can besupplemented by, or incorporated in, special purpose logic circuitry.

To provide for interaction with a user, embodiments of the subjectmatter described in this specification can be implemented on a computerhaving a display device, e.g., a CRT (cathode ray tube) or LCD (liquidcrystal display) monitor, for displaying information to the user and akeyboard and a pointing device, e.g., a mouse or a trackball, by whichthe user can provide input to the computer. Other kinds of devices canbe used to provide for interaction with a user as well; for example,feedback provided to the user can be any form of sensory feedback, e.g.,visual feedback, auditory feedback, or tactile feedback; and input fromthe user can be received in any form, including acoustic, speech, ortactile input. In addition, a computer can interact with a user bysending documents to and receiving documents from a device that is usedby the user; for example, by sending web pages to a web browser on auser's client device in response to requests received from the webbrowser.

Embodiments of the subject matter described in this specification can beimplemented in a computing system that includes a back end component,e.g., as a data server, or that includes a middleware component, e.g.,an application server, or that includes a front end component, e.g., aclient computer having a graphical user interface or a Web browserthrough which a user can interact with an implementation of the subjectmatter described in this specification, or any combination of one ormore such back end, middleware, or front end components. The componentsof the system can be interconnected by any form or medium of digitaldata communication, e.g., a communication network. Examples ofcommunication networks include a local area network (“LAN”) and a widearea network (“WAN”), e.g., the Internet.

The computing system can include clients and servers. A client andserver are generally remote from each other and typically interactthrough a communication network. The relationship of client and serverarises by virtue of computer programs running on the respectivecomputers and having a client-server relationship to each other.

While this specification contains many specific implementation details,these should not be construed as limitations on the scope of anyinvention or of what may be claimed, but rather as descriptions offeatures that may be specific to particular embodiments of particularinventions. Certain features that are described in this specification inthe context of separate embodiments can also be implemented incombination in a single embodiment. Conversely, various features thatare described in the context of a single embodiment can also beimplemented in multiple embodiments separately or in any suitablesubcombination. Moreover, although features may be described above asacting in certain combinations and even initially claimed as such, oneor more features from a claimed combination can in some cases be excisedfrom the combination, and the claimed combination may be directed to asubcombination or variation of a subcombination.

Similarly, while operations are depicted in the drawings in a particularorder, this should not be understood as requiring that such operationsbe performed in the particular order shown or in sequential order, orthat all illustrated operations be performed, to achieve desirableresults. In certain circumstances, multitasking and parallel processingmay be advantageous. Moreover, the separation of various system modulesand components in the embodiments described above should not beunderstood as requiring such separation in all embodiments, and itshould be understood that the described program components and systemscan generally be integrated together in a single software product orpackaged into multiple software products.

Particular embodiments of the subject matter have been described. Otherembodiments are within the scope of the following claims. For example,the actions recited in the claims can be performed in a different orderand still achieve desirable results. As one example, the processesdepicted in the accompanying figures do not necessarily require theparticular order shown, or sequential order, to achieve desirableresults. In certain implementations, multitasking and parallelprocessing may be advantageous.

What is claimed is:
 1. A method of training a neural network todetermine trained values of parameters of the neural network byoptimizing a specified objective function that takes as input a neuralnetwork output generated by the neural network for a neural networkinput and a target output for the neural network input, the methodcomprising: obtaining a plurality of training inputs and, for each ofthe plurality of training inputs, a respective target output for thetraining input; and training the neural network on each of the pluralityof training inputs, comprising, for each of the plurality of traininginputs: processing the training input using the neural network todetermine a neural network output for the training input in accordancewith current values of the parameters of the neural network; generatingan adversarial perturbation of the training input comprising:determining a gradient of the specified objective function with respectto the training input; and modifying the training input using thedetermined gradient of the specified objective function to generate theadversarial perturbation {circumflex over (x)}, where the adversarialperturbation satisfies:{circumflex over (x)}=x+ϵ sign(∇_(x)(J)), where x is the training input,∇_(x)(J) is the gradient of the specified objective function withrespect to the training input x, ϵ is a predetermined constant value,and sign is a function that receives a vector of inputs and generates avector of outputs such that, for each value in the vector of outputs,the value is a predetermined positive number if the corresponding valuein the vector of inputs is positive, the value is zero if thecorresponding value in the vector of inputs is zero, and the value is apredetermined negative number if the corresponding value in the vectorof inputs is negative; processing the adversarial perturbation of thetraining input using the neural network to determine a neural networkoutput for the adversarial perturbation of the training input inaccordance with the current values of the parameters of the neuralnetwork; and adjusting the current values of the parameters of theneural network by performing an iteration of a neural network trainingprocedure to optimize an adversarial objective function, wherein theadversarial objective function is a combination of: (i) the specifiedobjective function taking as input the neural network output for thetraining input and the target output for the training input; and (ii)the specified objective function taking as input the neural networkoutput for the adversarial perturbation of the training input and thetarget output for the training input.
 2. The method of claim 1, whereinϵ is a value that is small enough to be discarded by a sensor or datastorage apparatus due to a limited precision of the sensor or datastorage apparatus.
 3. The method of claim 1, wherein each entry of theadversarial perturbation of the training input differs from acorresponding value in the training input by less than a thresholdvalue, and wherein two values differing by less than the threshold valueare treated as the same value by a particular sensor or a particulardata storage apparatus.
 4. The method of claim 1, wherein theadversarial objective function J′(θ, x, y) satisfies:J′(θ,x,y)=αJ(θ,x,y)+(1−α)J(θ,{circumflex over (x)},y), where θ are thecurrent values of the parameters of the neural network, x is thetraining input, y is the target output for the training input x, α is apredetermined constant value, {circumflex over (x)} is the adversarialperturbation of the training input x, J(θ, x,y) is the specifiedobjective function taking as input the neural network output for thetraining input and the target output y for the training input x, andJ(θ,{circumflex over (x)},y) is the specified objective function takingas input the neural network output for the adversarial perturbation{circumflex over (x)} of the training input x and the target output yfor the training input x.
 5. The method of claim 1, wherein performingan iteration of a neural network training procedure to optimize anadversarial objective function comprises performing an iteration of agradient descent training procedure to adjust the current values of theparameters of the neural network.
 6. A system comprising one or morecomputers and one or more storage devices storing instructions that whenexecuted by one or more computers cause the one or more computers toperform operations for training a neural network to determine trainedvalues of parameters of the neural network by optimizing a specifiedobjective function that takes as input a neural network output generatedby the neural network for a neural network input and a target output forthe neural network input, the operations comprising: obtaining aplurality of training inputs and, for each of the plurality of traininginputs, a respective target output for the training input; and trainingthe neural network on each of the plurality of training inputs,comprising, for each of the plurality of training inputs: processing thetraining input using the neural network to determine a neural networkoutput for the training input in accordance with current values of theparameters of the neural network; generating an adversarial perturbationof the training input comprising: determining a gradient of thespecified objective function with respect to the training input; andmodifying the training input using the determined gradient of thespecified objective function to generate the adversarial perturbation{circumflex over (x)}, where the adversarial perturbation satisfies:{circumflex over (x)}=x+ϵ sign(∇_(x)(J)), where x is the training input,∇_(x)(J) is the gradient of the specified objective function withrespect to the training input x, ϵ is a predetermined constant value,and sign is a function that receives a vector of inputs and generates avector of outputs such that, for each value in the vector of outputs,the value is a predetermined positive number if the corresponding valuein the vector of inputs is positive, the value is zero if thecorresponding value in the vector of inputs is zero, and the value is apredetermined negative number if the corresponding value in the vectorof inputs is negative; processing the adversarial perturbation of thetraining input using the neural network to determine a neural networkoutput for the adversarial perturbation of the training input inaccordance with the current values of the parameters of the neuralnetwork; and adjusting the current values of the parameters of theneural network by performing an iteration of a neural network trainingprocedure to optimize an adversarial objective function, wherein theadversarial objective function is a combination of: (i) the specifiedobjective function taking as input the neural network output for thetraining input and the target output for the training input; and (ii)the specified objective function taking as input the neural networkoutput for the adversarial perturbation of the training input and thetarget output for the training input.
 7. The system of claim 6, whereinϵ is a value that is small enough to be discarded by a sensor or datastorage apparatus due to a limited precision of the sensor or datastorage apparatus.
 8. The system of claim 6, wherein each entry of theadversarial perturbation of the training input differs from acorresponding value in the training input by less than a thresholdvalue, and wherein two values differing by less than the threshold valueare treated as the same value by a particular sensor or a particulardata storage apparatus.
 9. The system of claim 6, wherein theadversarial objective function J′(θ, x,y) satisfies:J′(θ,x,y)=αJ(θ,x,y)+(1−α)J(θ,{circumflex over (x)},y), where θ are thecurrent values of the parameters of the neural network, x is thetraining input, y is the target output for the training input x, α is apredetermined constant value, {circumflex over (x)} is the adversarialperturbation of the training input x, J(θ, x,y) is the specifiedobjective function taking as input the neural network output for thetraining input and the target output y for the training input x, andJ(θ, x,y) is the specified objective function taking as input the neuralnetwork output for the adversarial perturbation {circumflex over (x)} ofthe training input x and the target output y for the training input x.10. The system of claim 6, wherein performing an iteration of a neuralnetwork training procedure to optimize an adversarial objective functioncomprises performing an iteration of a gradient descent trainingprocedure to adjust the current values of the parameters of the neuralnetwork.
 11. One or more non-transitory computer storage media encodedwith instructions that, when executed by one or more computers, causethe one or more computers to perform operations for training a neuralnetwork to determine trained values of parameters of the neural networkby optimizing a specified objective function that takes as input aneural network output generated by the neural network for a neuralnetwork input and a target output for the neural network input, theoperations comprising: obtaining a plurality of training inputs and, foreach of the plurality of training inputs, a respective target output forthe training input; and training the neural network on each of theplurality of training inputs, comprising, for each of the plurality oftraining inputs: processing the training input using the neural networkto determine a neural network output for the training input inaccordance with current values of the parameters of the neural network;generating an adversarial perturbation of the training input comprising:determining a gradient of the specified objective function with respectto the training input; and modifying the training input using thedetermined gradient of the specified objective function to generate theadversarial perturbation {circumflex over (x)}, where the adversarialperturbation satisfies:{circumflex over (x)}=x+ϵ sign(∇_(x)(J)), where x is the training input,∇_(x)(J) is the gradient of the specified objective function withrespect to the training input x, ϵ is a predetermined constant value,and sign is a function that receives a vector of inputs and generates avector of outputs such that, for each value in the vector of outputs,the value is a predetermined positive number if the corresponding valuein the vector of inputs is positive, the value is zero if thecorresponding value in the vector of inputs is zero, and the value is apredetermined negative number if the corresponding value in the vectorof inputs is negative; processing the adversarial perturbation of thetraining input using the neural network to determine a neural networkoutput for the adversarial perturbation of the training input inaccordance with the current values of the parameters of the neuralnetwork; and adjusting the current values of the parameters of theneural network by performing an iteration of a neural network trainingprocedure to optimize an adversarial objective function, wherein theadversarial objective function is a combination of: (i) the specifiedobjective function taking as input the neural network output for thetraining input and the target output for the training input; and (ii)the specified objective function taking as input the neural networkoutput for the adversarial perturbation of the training input and thetarget output for the training input.
 12. The computer storage media ofclaim 11, wherein ϵ is a value that is small enough to be discarded by asensor or data storage apparatus due to a limited precision of thesensor or data storage apparatus.
 13. The computer storage media ofclaim 11, wherein each entry of the adversarial perturbation of thetraining input differs from a corresponding value in the training inputby less than a threshold value, and wherein two values differing by lessthan the threshold value are treated as the same value by a particularsensor or a particular data storage apparatus.
 14. The computer storagemedia of claim 11, wherein the adversarial objective function J′(θ, x,y)satisfies:J′(θ,x,y)=αJ(θ,x,y)+(1−α)J(θ,{circumflex over (x)},y), where θ are thecurrent values of the parameters of the neural network, x is thetraining input, y is the target output for the training input x, α is apredetermined constant value, {circumflex over (x)} is the adversarialperturbation of the training input x, J(θ, x,y) is the specifiedobjective function taking as input the neural network output for thetraining input and the target output y for the training input x, andJ(θ,{circumflex over (x)},y) is the specified objective function takingas input the neural network output for the adversarial perturbation{circumflex over (x)}of the training input x and the target output y forthe training input x.